package com.wanbangee.marksystem.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.wanbangee.marksystem.service.QueryOnePointAndThreeRateRankingService;
import com.wanbangee.marksystem.service.QueryOnePointAndThreeRateService;

@CrossOrigin
@RestController
@RequestMapping("/subScoreAnalyze")
public class QueryOnePointAndThreeRateController {

	@Autowired
	private QueryOnePointAndThreeRateService queryOnePointAndThreeRateService;
	
	@Autowired
	private QueryOnePointAndThreeRateRankingService queryOnePointAndThreeRateRankingService;
	
	@RequestMapping(value="/selectARateOffThree",method=RequestMethod.GET)
	public Map<String, Object> showOnePointAndThreeRate(Integer examId,Integer claId,Integer subId){
		return this.queryOnePointAndThreeRateService.selectOnePointAndThree(examId, claId, subId);
	}
	
	@RequestMapping(value="/selectARateOffThreeRank",method=RequestMethod.GET)
	public Map<String, Object> showOnePointAndThreeRateRanking(Integer examId,Integer claId,Integer subId){
		return this.queryOnePointAndThreeRateRankingService.selectOnePointAndThreeRateRanking(examId, subId, claId);
	}
}
